package cn.qiao.dubbo.provider.impl;

import cn.qiao.dubbo.TestGenericService;
import cn.qiao.dubbo.common.PageReq;
import cn.qiao.dubbo.common.User;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.ArrayList;
import java.util.List;

/**
 * desc:
 *
 * @author qiao
 * @date 2023年07月17日 22:34
 */
@DubboService()
public class TestGenericServiceImpl implements TestGenericService {
    @Override
    public String singleParam(User user) {
        System.out.println(user);
        return "ok";
    }

    @Override
    public User multiParam(String id, User user) {
        return user;
    }

    @Override
    public List<User> genericTypeParam(PageReq<User> userReq) {
        ArrayList<User> objects = new ArrayList<>();
        User user = new User();
        objects.add(user);
        return objects;
    }
}
